﻿@using BonjourQuotation.UI.Models.PartialModel
@model QuotationGirGroupGridViewModel


@using (Ajax.BeginForm("QuotationSaveGirGroup", "Quotation", new AjaxOptions() { HttpMethod = "Post", OnComplete="InitGirGroupCalendars", UpdateTargetId = "QuotaGirGroupGridDiv", InsertionMode = InsertionMode.Replace }, new { enctype = "multipart/form-data", id = "QuotaGirGroupGridForm" }))
{
    @Html.HiddenFor(model => Model.IsNewGroup)
    @Html.HiddenFor(model => Model.IsNewInv)
    @Html.HiddenFor(model => Model.IsSaveGroup)
    @Html.HiddenFor(model => Model.IsSaveInvoice)
    @Html.HiddenFor(model => Model.AddGirQuotaID)
    @Html.HiddenFor(model => Model.AddGirSeasonID)
    @Html.HiddenFor(model => Model.AddGirSelCustomerID)
    @Html.HiddenFor(model => Model.IsGir)
    @Html.HiddenFor(model => Model.Rows.Count, new { @id = "GirGroupRowsCount"})
    @Html.HiddenFor(model => Model.GrActionMessage)
    


<div style="max-height:300px; min-height:200px; margin-left:10px; margin-right:10px; margin-top:20px; padding-right:10px;">

    <div>
        @if(Model.IsGir == false)
        { 
        <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 1250px; background-color:white;">
            <thead>
                <tr>
                    <th width="72px;" class="GridHeaders font12">Gr. #</th>
                    <th width="108px;" class="GridHeaders font12">Group Code</th>
                    <th width="210px;" class="GridHeaders font12">Group Name</th>
                    <th width="50px;" class="GridHeaders font12">As Gir</th>
                    <th width="144px;" class="GridHeaders font12">Status</th> 
                    <th width="144px;" class="GridHeaders font12">Country</th>
                    <th width="108px;" class="GridHeaders font12">Arrival Date</th>
                    <th width="48px;" class="GridHeaders font12">Night</th>
                    <th width="108px;" class="GridHeaders font12">Dep. Date</th>
                    <th width="48px;" class="GridHeaders font12">Pax</th>
                    <th width="54px;" class="GridHeaders font12">Rooms</th>
                    @if ((Model.QuotaDetailCreateGirGroupEdit && Model.IsGir) || Model.QuotaDetailCreateGroupSeriesEdit && !Model.IsGir)
                    { 
                        <th width="96px;" class="GridHeaders font12">Oper Room</th>
                        <th width="60px;" class="GridHeaders font12">Push</th>
                    }
                    else
                    {
                        <th width="156px;" class="GridHeaders font12">Oper Room</th>
                    }
                    
                </tr>
            </thead>
        </table>
        }
        else
        {
           <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 1350px; background-color:white;">
            <thead>
                <tr>
                    <th width="72px;" class="GridHeaders font12">Gr. #</th>
                    <th width="108px;" class="GridHeaders font12">Group Code</th>
                    <th width="210px;" class="GridHeaders font12">Group Name</th>
                    <th width="150px;" class="GridHeaders font12">Customer</th>
                    <th width="144px;" class="GridHeaders font12">Status</th> 
                    <th width="144px;" class="GridHeaders font12">Country</th>
                    <th width="108px;" class="GridHeaders font12">Arrival Date</th>
                    <th width="48px;" class="GridHeaders font12">Night</th>
                    <th width="108px;" class="GridHeaders font12">Dep. Date</th>
                    <th width="48px;" class="GridHeaders font12">Pax</th>
                    <th width="54px;" class="GridHeaders font12">Rooms</th>
                    @if ((Model.QuotaDetailCreateGirGroupEdit && Model.IsGir) || Model.QuotaDetailCreateGroupSeriesEdit && !Model.IsGir)
                    { 
                        <th width="96px;" class="GridHeaders font12">Oper Room</th>
                        <th width="60px;" class="GridHeaders font12">Push</th>
                    }
                    else
                    {
                        <th width="156px;" class="GridHeaders font12">Oper Room</th>
                    }
                </tr>
            </thead>
        </table> 
        }
        <div style="height:170px; overflow-y:auto;">
            @if(Model.IsGir == false)
            { 
            <table class="table table-bordered table-hover table-condensed" style="width: 1250px; table-layout: fixed; background-color: white;">
                <tbody>
                    @for (int ind = 0; ind < Model.Rows.Count; ind++)
                    {
                        Model.GirRowSelStatus = Model.Rows[ind].GirSelStatusID;
                        Model.GirRowSelCountry = Model.Rows[ind].GirSelCountryID;
                        <tr>
                            <td width="71px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupID, new { @class = "table_inputs_65 table_inputs_WithoutBox", @readonly = true })</td>
                            @if ((@Model.Rows[ind].IsPushed) || (@Model.Rows[ind].GirSelStatusID == "3"))
                            { 
                                <td width ="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupCode, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirGroupCode", @readonly = true })</td>
                                <td width="210px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupName, new { @class = "table_inputs_205 table_inputs_WithoutBox QuotaGirGrpControls GirGroupName", @readonly = true })</td>
                                <td width="50px;" align="center">
                                    @Html.CheckBoxFor(model => Model.Rows[ind].AsGir, new { @class = "QuotaGirGrpControls ", @disabled = "disabled" })
                                </td>
                                <td width="144px;" title="@Model.Rows[ind].GirCancelInfo">
                                    @Html.DropDownListFor(model => Model.GirRowSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls", @Disabled = true })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelStatusID, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "hidden table_inputs_WithoutBox"})
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelCountry, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls", @Disabled = true })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = " hidden table_inputs_WithoutBox"})
                                </td>
                                @*<td>@Html.TextBoxFor(model => Model.Rows[ind].GirSeason, new { @class = "table_inputs_160" })</td>*@
                                <td width="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirArrivalDate, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirArrivalDate", @readonly = true })</td>
                            }
                            else
                            {
                                <td width ="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupCode, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirGroupCode" })</td>
                                <td width="210px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupName, new { @class = "table_inputs_205 table_inputs_WithoutBox QuotaGirGrpControls GirGroupName" })</td>
                                <td width="60px;">
                                    @Html.TextBoxFor(model => Model.Rows[ind].GirCustomer, new { @class = "table_inputs_145 table_inputs_WithoutBox QuotaGirGrpControls ", @readonly = true })
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls" })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelStatusID, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "hidden table_inputs_WithoutBox" })
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelCountry, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls" })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = " hidden table_inputs_WithoutBox" })
                                </td>
                                @*<td>@Html.TextBoxFor(model => Model.Rows[ind].GirSeason, new { @class = "table_inputs_160" })</td>*@
                                <td width="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirArrivalDate, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirDate QuotaGirGrpControls GirArrivalDate" })</td>
                            }
                            <td width="48px;">
                                @Html.LabelForModel(Model.Rows[ind].GirNoNights, new { @class = "table_inputs_43" })
                                @Html.HiddenFor(model => Model.Rows[ind].GirNoNights)
                            </td>
                            <td width="108px;">@Html.LabelForModel(Model.Rows[ind].GirDepartureDate, new { @class = "table_inputs_105" })</td>
                            @if ((@Model.Rows[ind].IsPushed) || (@Model.Rows[ind].GirSelStatusID == "3"))
                            {
                                <td width="48px;">@Html.TextBoxFor(model => Model.Rows[ind].GirPax, new { @class = "table_inputs_43 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirPax PopUpGirPax QuotaTextBx", @readonly = true })</td>
                                <td width="54px;">@Html.TextBoxFor(model => Model.Rows[ind].GirRoom, new { @class = "table_inputs_50 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirRoom PopUpGirRoom QuotaTextBx", @readonly = true })</td>
                            }
                            else
                            {
                                 <td width="48px;">@Html.TextBoxFor(model => Model.Rows[ind].GirPax, new { @class = "table_inputs_43 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirPax PopUpGirPax QuotaTextBx" })</td>
                                 <td width="54px;">@Html.TextBoxFor(model => Model.Rows[ind].GirRoom, new { @class = "table_inputs_50 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirRoom PopUpGirRoom QuotaTextBx" })</td>
                            }
                            @if ((Model.QuotaDetailCreateGirGroupEdit && Model.IsGir) || Model.QuotaDetailCreateGroupSeriesEdit && !Model.IsGir)
                            {
                                <td width="96px;" style="text-align:center"><input type="button" onclick="javascript: window.open('../Operation/Operation?Roomtab=Y&GroupCode=@Model.Rows[ind].GirGroupCode');" class="btn14 btn60 btnheight22" value="->"></td>
                                <td width="60px;" style="text-align:center">
                                    @if (@Model.Rows[ind].IsPushed)
                                    {
                                        <input type="button" disabled onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:gray;" value="Push">
                                    }
                                    else if (@Model.Rows[ind].GirSelStatusID != "3")
                                    {
                                        <input type="button" disabled onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:green;" value="Push">
                                    }
                                    else
                                    {
                                        <input type="button" onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:red;" value="Push">
                                    }
                                </td>
                            }
                            else
                            {
                                <td width="156px;" style="text-align:center"><input type="button" onclick="javascript: window.open('../Operation/Operation?Roomtab=Y&GroupCode=@Model.Rows[ind].GirGroupCode');" class="btn14 btn60 btnheight22" value="->"></td>
                            }
                        </tr>
                    }
                </tbody>
            </table>
            }
            else
            {
              <table class="table table-bordered table-hover table-condensed" style="width: 1350px; table-layout: fixed; background-color: white;">
                <tbody>
                    @for (int ind = 0; ind < Model.Rows.Count; ind++)
                    {
                        Model.GirRowSelStatus = Model.Rows[ind].GirSelStatusID;
                        Model.GirRowSelCountry = Model.Rows[ind].GirSelCountryID;
                        <tr>
                            <td width="71px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupID, new { @class = "table_inputs_65 table_inputs_WithoutBox", @readonly = true })</td>
                            @if ((@Model.Rows[ind].IsPushed) || (@Model.Rows[ind].GirSelStatusID == "3"))
                            { 
                                <td width ="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupCode, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirGroupCode", @readonly = true })</td>
                                <td width="210px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupName, new { @class = "table_inputs_205 table_inputs_WithoutBox QuotaGirGrpControls GirGroupName", @readonly = true })</td>
                                <td width="150px;">
                                    @Html.TextBoxFor(model => Model.Rows[ind].GirCustomer, new { @class = "table_inputs_145 table_inputs_WithoutBox QuotaGirGrpControls ", @readonly = true })
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls", @Disabled = true })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelStatusID, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "hidden table_inputs_WithoutBox"})
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelCountry, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls", @Disabled = true })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = " hidden table_inputs_WithoutBox"})
                                </td>
                                @*<td>@Html.TextBoxFor(model => Model.Rows[ind].GirSeason, new { @class = "table_inputs_160" })</td>*@
                                <td width="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirArrivalDate, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirArrivalDate", @readonly = true })</td>
                            }
                            else
                            {
                                <td width ="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupCode, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirGrpControls GirGroupCode" })</td>
                                <td width="210px;">@Html.TextBoxFor(model => Model.Rows[ind].GirGroupName, new { @class = "table_inputs_205 table_inputs_WithoutBox QuotaGirGrpControls GirGroupName" })</td>
                                <td width="60px;">
                                    @Html.TextBoxFor(model => Model.Rows[ind].GirCustomer, new { @class = "table_inputs_145 table_inputs_WithoutBox QuotaGirGrpControls ", @readonly = true })
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls" })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelStatusID, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "hidden table_inputs_WithoutBox" })
                                </td>
                                <td width="144px;">
                                    @Html.DropDownListFor(model => Model.GirRowSelCountry, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "table_inputs_140 table_inputs_WithoutBox GirNonGirStatusDrop QuotaGirGrpControls" })
                                    @Html.DropDownListFor(model => Model.Rows[ind].GirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = " hidden table_inputs_WithoutBox" })
                                </td>
                                @*<td>@Html.TextBoxFor(model => Model.Rows[ind].GirSeason, new { @class = "table_inputs_160" })</td>*@
                                <td width="108px;">@Html.TextBoxFor(model => Model.Rows[ind].GirArrivalDate, new { @class = "table_inputs_105 table_inputs_WithoutBox QuotaGirDate QuotaGirGrpControls GirArrivalDate" })</td>
                            }
                            <td width="48px;">
                                @Html.LabelForModel(Model.Rows[ind].GirNoNights, new { @class = "table_inputs_43" })
                                @Html.HiddenFor(model => Model.Rows[ind].GirNoNights)
                            </td>
                            <td width="108px;">@Html.LabelForModel(Model.Rows[ind].GirDepartureDate, new { @class = "table_inputs_105" })</td>
                            @if ((@Model.Rows[ind].IsPushed) || (@Model.Rows[ind].GirSelStatusID == "3"))
                            {
                                <td width="48px;">@Html.TextBoxFor(model => Model.Rows[ind].GirPax, new { @class = "table_inputs_43 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirPax PopUpGirPax QuotaTextBx", @readonly = true })</td>
                                <td width="54px;">@Html.TextBoxFor(model => Model.Rows[ind].GirRoom, new { @class = "table_inputs_50 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirRoom PopUpGirRoom QuotaTextBx", @readonly = true })</td>
                            }
                            else
                            {
                                 <td width="48px;">@Html.TextBoxFor(model => Model.Rows[ind].GirPax, new { @class = "table_inputs_43 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirPax PopUpGirPax QuotaTextBx" })</td>
                                 <td width="54px;">@Html.TextBoxFor(model => Model.Rows[ind].GirRoom, new { @class = "table_inputs_50 table_inputs_WithoutBox QuotaGirGrpControls QuotaOnlyDigits GirRoom PopUpGirRoom QuotaTextBx" })</td>
                            }
                            @if ((Model.QuotaDetailCreateGirGroupEdit && Model.IsGir) || Model.QuotaDetailCreateGroupSeriesEdit && !Model.IsGir)
                            {
                                <td width="96px;" style="text-align:center"><input type="button" onclick="javascript: window.open('../Operation/Operation?Roomtab=Y&GroupCode=@Model.Rows[ind].GirGroupCode');" class="btn14 btn60 btnheight22" value="->"></td>
                                <td width="60px;" style="text-align:center">
                                    @if (@Model.Rows[ind].IsPushed)
                                    {
                                        <input type="button" disabled onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:gray;" value="Push">
                                    }
                                    else if (@Model.Rows[ind].GirSelStatusID != "3")
                                    {
                                        <input type="button" disabled onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:green;" value="Push">
                                    }
                                    else
                                    {
                                        <input type="button" onclick="GroupPushOperation(@Model.Rows[ind].GirGroupID)" class="btn14 btn50 btnheight22" style="background-color:red;" value="Push">
                                    }
                                </td>
                            }
                            else
                            {
                                <td width="156px;" style="text-align:center"><input type="button" onclick="javascript: window.open('../Operation/Operation?Roomtab=Y&GroupCode=@Model.Rows[ind].GirGroupCode');" class="btn14 btn60 btnheight22" value="->"></td>
                            }
                        </tr>
                    }
                </tbody>
            </table>  
            }

        </div>
    </div>

</div>
    if ((Model.QuotaDetailCreateGirGroupEdit && Model.IsGir) || Model.QuotaDetailCreateGroupSeriesEdit && !Model.IsGir)
    { 
        <div id="GirGroupGridDiv" style="padding-top:12px; padding-bottom:12px; margin-right:40px;" class="pull-right">
            <input type="submit" id="SaveGirGroupBtn" class="btn14 btn60" value="Save">
            <input type="button" id="AddNewGirGroupBtn" class="btn14 btn120" onclick="javascript: $('#AddNewGirGroupDiv').show(); $('#GirGroupGridDiv').hide();" value="Add New Group">
        </div>
    }
    <div style="margin-left:10px; margin-right:10px; margin-top:8px; display:none; padding-right:32px; height:70px;" id="AddNewGirGroupDiv">
        <div style="overflow-x: auto; max-width: 1450px;">
        @if(Model.IsGir == false)
        { 
        <table class="table table-bordered table-hover table-condensed" style="width: 1470px; margin-bottom: -1px !important; background-color: white; ">
            <thead>
                <tr>
                    <th width="72px;" class="GridHeaders font12">Gr. #</th>
                    <th width="108px;" class="GridHeaders font12">Group Code</th>
                    <th width="210px;" class="GridHeaders font12">Group Name</th>
                    <th width="144px;" class="GridHeaders font12">Status</th>
                    <th width="144px;" class="GridHeaders font12">Country</th>
                    <th width="108px;" class="GridHeaders font12">Arrival Date</th>
                    <th width="48px;" class="GridHeaders font12">Night</th>
                    <th width="48px;" class="GridHeaders font12">Pax</th>
                    <th width="54px;" class="GridHeaders font12">Rooms</th>
                    <th width="54px;" class="GridHeaders font12">As Gir</th>
                    <th width="120px;" class="GridHeaders font12">Hotel Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Attr. Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Misc. Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Bus Emp.</th>
                </tr>
            </thead>
        </table>
        }
        else
        {
            <table class="table table-bordered table-hover table-condensed" style="width: 1646px; margin-bottom: -1px !important; background-color: white; ">
            <thead>
                <tr>
                    <th width="72px;" class="GridHeaders font12">Gr. #</th>
                    <th width="108px;" class="GridHeaders font12">Group Code</th>
                    <th width="210px;" class="GridHeaders font12">Group Name</th>
                    <th width="230px;" class="GridHeaders font12">Gir Customer</th>
                    <th width="144px;" class="GridHeaders font12">Status</th>
                    <th width="144px;" class="GridHeaders font12">Country</th>
                    <th width="108px;" class="GridHeaders font12">Arrival Date</th>
                    <th width="48px;" class="GridHeaders font12">Night</th>
                    <th width="48px;" class="GridHeaders font12">Pax</th>
                    <th width="54px;" class="GridHeaders font12">Rooms</th>
                    <th width="120px;" class="GridHeaders font12">Hotel Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Attr. Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Misc. Emp.</th>
                    <th width="120px;" class="GridHeaders font12">Bus Emp.</th>
                </tr>
            </thead>
        </table>
        }

        @if(Model.IsGir == false)
        {  
        <table class="table table-bordered table-hover table-condensed" style="width: 1470px; table-layout: fixed; background-color: white; margin-bottom:8px;">
                <tr>
                    <td width="71px;">@Html.TextBoxFor(model => Model.AddGirGroupID, new { @class = "QuotaAddGirGrpControls table_inputs_65 table_inputs_WithoutBox", @readonly = true })</td>
                    <td width="108px;">@Html.TextBoxFor(model => Model.AddGirGroupCode, new { @class = "QuotaAddGirGrpControls table_inputs_105 table_inputs_WithoutBox" })</td>
                    <td width="210px;">@Html.TextBoxFor(model => Model.AddGirGroupName, new { @class = "QuotaAddGirGrpControls table_inputs_205 table_inputs_WithoutBox" })</td>
                    <td width="144px;">@Html.DropDownListFor(model => model.AddGirSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_140 table_inputs_WithoutBox" })</td>
                    <td width="144px;">@Html.DropDownListFor(model => model.AddGirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_140 table_inputs_WithoutBox" })</td>
                    @*<td>@Html.TextBoxFor(model => Model.AddGirSeason, new { @class = "table_inputs_160" })</td>*@
                    <td width="108px;">@Html.TextBoxFor(model => Model.AddGirArrivalDate, new { @class = "QuotaAddGirGrpControls table_inputs_105 table_inputs_WithoutBox QuotaGirDate" })</td>
                    <td width="48px;">@Html.TextBoxFor(model => Model.AddGirNoNights, new { @class = "QuotaAddGirGrpControls  table_inputs_45 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirNights QuotaTextBx" })</td>
                    <td width="48px;">@Html.TextBoxFor(model => Model.AddGirPax, new { @class = "QuotaAddGirGrpControls table_inputs_43 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirPax QuotaTextBx" })</td>
                    <td width="54px;">@Html.TextBoxFor(model => Model.AddGirRoom, new { @class = "QuotaAddGirGrpControls table_inputs_50 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirRoom QuotaTextBx" })</td>
                    <td width="54px;" align="center">@Html.CheckBoxFor(model => Model.AddGirAsGir, new { @class = "QuotaAddGirGrpControls table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelHotelEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelAttrEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelMiscEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelBusEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                </tr>
            </table>
        }
        else
        {
            <table class="table table-bordered table-hover table-condensed" style="width: 1646px; table-layout: fixed; background-color: white;">
                <tr>
                    <td width="71px;">@Html.TextBoxFor(model => Model.AddGirGroupID, new { @class = "QuotaAddGirGrpControls table_inputs_65 table_inputs_WithoutBox", @readonly = true })</td>
                    <td width="108px;">@Html.TextBoxFor(model => Model.AddGirGroupCode, new { @class = "QuotaAddGirGrpControls table_inputs_105 table_inputs_WithoutBox" })</td>
                    <td width="210px;">@Html.TextBoxFor(model => Model.AddGirGroupName, new { @class = "QuotaAddGirGrpControls table_inputs_205 table_inputs_WithoutBox" })</td>
                    <td width="230px;">
                        @Html.TextBoxFor(model => Model.AddGirCustomer, new { @class = "QuotaAddGirGrpControls table_inputs_225 table_inputs_WithoutBox QuotaTxtComplete" })
                        @Html.HiddenFor(model => Model.AddGirMainCustomerID)
                    </td>
                    <td width="144px;">@Html.DropDownListFor(model => model.AddGirSelStatus, new SelectList(Model.GroupStatus, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_140 table_inputs_WithoutBox" })</td>
                    <td width="144px;">@Html.DropDownListFor(model => model.AddGirSelCountryID, new SelectList(Model.GroupCountry, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_140 table_inputs_WithoutBox" })</td>
                    @*<td>@Html.TextBoxFor(model => Model.AddGirSeason, new { @class = "table_inputs_160" })</td>*@
                    <td width="108px;">@Html.TextBoxFor(model => Model.AddGirArrivalDate, new { @class = "QuotaAddGirGrpControls table_inputs_105 table_inputs_WithoutBox QuotaGirDate" })</td>
                    <td width="48px;">@Html.TextBoxFor(model => Model.AddGirNoNights, new { @class = "QuotaAddGirGrpControls  table_inputs_45 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirNights QuotaTextBx" })</td>
                    <td width="48px;">@Html.TextBoxFor(model => Model.AddGirPax, new { @class = "QuotaAddGirGrpControls table_inputs_43 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirPax QuotaTextBx" })</td>
                    <td width="54px;">@Html.TextBoxFor(model => Model.AddGirRoom, new { @class = "QuotaAddGirGrpControls table_inputs_50 table_inputs_WithoutBox QuotaOnlyDigits PopUpGirRoom QuotaTextBx" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelHotelEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelAttrEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelMiscEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                    <td width="120px;">@Html.DropDownListFor(model => model.AddGirSelBusEmpID, new SelectList(Model.Employee, "Value", "Text"), new { @class = "QuotaAddGirGrpControls table_inputs_116 table_inputs_WithoutBox" })</td>
                </tr>
            </table>
        }
    </div>
    <div>
        <input type="button" id="SaveNewGirGroupBtn" class="btn14 btn60" value="Save">
        <input type="button" id="CancelNewGirGroupBtn" onclick="AddNewGirGroupDivHide()" class="btn14 btn60" value="Cancel">
    </div>
</div>

    if (Model.IsGir && (Model.Rows.Count > 0))
    {
        <div style="min-height:100px; max-height:250px; margin-left:10px; margin-right:10px; margin-top:50px; padding-right:10px;">

            <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 1200px; background-color:white;">
                <thead>
                    <tr>
                        <th width="114px;" class="GridHeaders font12">Group Code</th>
                        <th width="216px;" class="GridHeaders font12">Group Name</th>
                        <th width="104px;" class="GridHeaders font12">Arrival Date</th>
                        <th width="206px;" class="GridHeaders font12">Customer</th>
                        <th width="48px;" class="GridHeaders font12">Pax</th>
                        <th width="60px;" class="GridHeaders font12">Pr. P.P</th>
                        <th width="96px;" class="GridHeaders font12">F. Board Pr.</th>
                        <th width="60px;" class="GridHeaders font12">S. Sup</th>
                        <th width="96px;" class="GridHeaders font12">Pr. P.P Cad</th>
                        <th width="110px;" class="GridHeaders font12">F. Board Pr. Cad</th>
                        <th width="90px;" class="GridHeaders font12">S. Sup Cad</th>
                    </tr>
                </thead>
            </table>

            <div style="height:170px; overflow-y:auto;">
                <table class="table table-bordered table-hover table-condensed" style="width: 1200px; table-layout: fixed; background-color: white;">
                    <tbody>
                        @for (int ind = 0; ind < Model.InvRows.Count; ind++)
                          {
                            <tr>
                                <td width="113px;">
                                    @Html.LabelForModel(Model.InvRows[ind].InvGroupCode, new { @class = "table_inputs_110 table_inputs_WithoutBox QuotaGirGrpCustomerControls" })
                                    @Html.HiddenFor(model => model.InvRows[ind].InvGroupID)
                                </td>
                                <td width="216px;">@Html.LabelForModel(Model.InvRows[ind].InvGroupName, new { @class = "table_inputs_210" })</td>
                                <td width="104px;">@Html.LabelForModel(Model.InvRows[ind].InvArrivalDate, new { @class = "table_inputs_100" })</td>
                                <td width="206px;">
                                    <div onclick="window.open('../Customer/ManageCustomers?CustomerID=@Model.InvRows[ind].InvCustomerID')">
                                        @Html.LabelForModel(Model.InvRows[ind].InvCustomer, new { @class = "table_inputs_200 table_inputs_CursorPointer" })
                                        @Html.HiddenFor(model => Model.InvRows[ind].InvCustomerID)
                                    </div>
                                </td>
                                <td width="48px;">@Html.LabelForModel(Model.InvRows[ind].InvPax.ToString(), new { @class = "table_inputs_45" })</td>
                                <td width="60px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPricePerPerson, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_55 table_inputs_WithoutBox" })</td>
                                <td width="96px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPriceFBoard, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_90 table_inputs_WithoutBox" })</td>
                                <td width="60px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPriceSingleSup, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_55 table_inputs_WithoutBox" })</td>
                                <td width="96px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPricePerPersonCad, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_90 table_inputs_WithoutBox" })</td>
                                <td width="110px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPriceFBoardCad, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_100 table_inputs_WithoutBox" })</td>
                                <td width="90px;">@Html.TextBoxFor(model => Model.InvRows[ind].InvPriceSingleSupCad, new { @class = "QuotaOnlyDecimalDigits QuotaGirGrpCustomerControls table_inputs_85 table_inputs_WithoutBox" })</td>
                            </tr>
                          }
                    </tbody>
                </table>
            </div>
       </div>
    if (Model.QuotaDetailCreateGirGroupEdit)
    { 
        <div id="GirGroupCustomerGridDiv" style="padding-top:12px; padding-bottom:12px; margin-right:40px;" class="pull-right">
            <input type="submit" id="SaveGirInvoiceBtn" class="btn14 btn60" value="Save">
            <input type="button" id="AddNewGirGroupCustomerBtn" class="btn14 btn120" onclick="javascript: $('#AddNewGirGroupCustomerDiv').show(); $('#GirGroupCustomerGridDiv').hide();" value="Add Customer">
            @*<input type="button" id="AddNewGirGroupBtn" class="btn btn-primary" onclick="javascript: $('#AddNewGirGroupDiv').show();" value="Add New Group">*@
        </div>
    }
    <div style="margin-left:10px; margin-right:10px; display:none; padding-right:32px;" id="AddNewGirGroupCustomerDiv">
            <table class="table table-bordered table-hover table-condensed" style="width: 936px; margin-bottom: -1px !important; background-color: white;">
                <thead>
                    <tr>
                        <th width="143px;" class="GridHeaders font12">Group Code</th>
                        <th width="255px;" class="GridHeaders font12">Customer</th>
                        <th width="65px;" class="GridHeaders font12">Pr. P.P</th>
                        <th width="96px;" class="GridHeaders font12">F. Board Pr.</th>
                        <th width="65px;" class="GridHeaders font12">S. Sup</th>
                        <th width="96px;" class="GridHeaders font12">Pr. P.P Cad</th>
                        <th width="126px;" class="GridHeaders font12">F. Board Pr. Cad</th>
                        <th width="90px;" class="GridHeaders font12">S. Sup Cad</th>
                    </tr>
                </thead>
            </table>
            
        <table class="table table-bordered table-hover table-condensed" style="width: 936px; table-layout: fixed; background-color: white;">
            <tr>
                <td width="142px;">
                    @Html.DropDownListFor(model => model.AddInvSelGroupID, new SelectList(Model.AddInvGroups, "Value", "Text"), new { @class = "QuotaAddGirGrpCustomerControls table_inputs_140 table_inputs_WithoutBox" })
                </td>
                <td width="255px;">
                    @Html.TextBoxFor(model => Model.AddInvCustomer, new { @class = "QuotaAddGirGrpCustomerControls table_inputs_250 QuotaTxtComplete table_inputs_WithoutBox" })
                    @Html.HiddenFor(model => Model.AddInvCustomerID)
                </td>
                <td width="65px;">@Html.TextBoxFor(model => Model.AddInvPricePerPerson, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_60 table_inputs_WithoutBox" })</td>
                <td width="96px;">@Html.TextBoxFor(model => Model.AddInvPriceFBoard, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_90 table_inputs_WithoutBox" })</td>
                <td width="65px;">@Html.TextBoxFor(model => Model.AddInvPriceSingleSup, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_60 table_inputs_WithoutBox" })</td>
                <td width="96px;">@Html.TextBoxFor(model => Model.AddInvPricePerPersonCad, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_90 table_inputs_WithoutBox" })</td>
                <td width="126px;">@Html.TextBoxFor(model => Model.AddInvPriceFBoardCad, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_120 table_inputs_WithoutBox" })</td>
                <td width="90px;">@Html.TextBoxFor(model => Model.AddInvPriceSingleSupCad, new { @class = "QuotaOnlyDecimalDigits QuotaAddGirGrpCustomerControls table_inputs_85 table_inputs_WithoutBox" })</td>
            </tr>
        </table>
                <div>
                    <input type="button" id="SaveNewGirGroupCustomerBtn" class="btn14 btn60" value="Save">
                    <input type="button" id="CancelNewGirGroupCustomerBtn" onclick="AddNewGirGroupCustomerDivHide()" class="btn14 btn60" value="Cancel">
                </div>
            </div>

    }
}





